<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ol id="elem">
        <li>Hello</li>
        <li>World</li>
      </ol>
      
    <script>
        // 创建一个函数clear(elem) 用来移除元素里的内容。
        let elem = document.getElementById('elem');
        function clear(elem) {
            document.getElementById('elem').innerHTML = '';    
        }
        clear(elem);
    </script>
</body>
</html>